package com.gzbugu.polytechsasia.dao;

import java.sql.SQLException;

import com.gzbugu.polytechsasia.vo.User;

/**
 * User DAO interface
 * 
 * @author gauze
 * 
 */
public interface IUserDAO {

	/**
	 * 保存
	 * 
	 * @param user
	 *            user instance
	 * @throws Exception
	 */
	public abstract void save(User user) throws Exception;

	/**
	 * 查询
	 * 
	 * @param id
	 *            user id
	 * @return User instance
	 * @throws SQLException
	 */
	public abstract User findById(int id) throws SQLException;

	/**
	 * 查询
	 * 
	 * @param passport
	 *            user passport
	 * @return User instance
	 * @throws SQLException
	 */
	public abstract User findByPassport(String passport) throws SQLException;

}